add_action('template_redirect', 'to_lower_case_redirect');
function to_lower_case_redirect() {
	if ($_SERVER['REQUEST_URI'] != strtolower($_SERVER['REQUEST_URI'])) {
		header('Location:' . get_home_url() . $_SERVER['HTTPS_HOST'] . strtolower($_SERVER['REQUEST_URI']), true, 301);
		return;
	}
}